<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
"Upside down clock" by Stephane Tsacas
stephane.tsacas+eleeno@gmail.com
-->
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<title>nonogram</title>
<script type="text/javascript"><!--
// Set to something for debugging.
var debug = 0;

// Wrapper to new Date() so you can set the time manually when debugging.
function currentTime()
{
  var timeNow;

  if (debug)
    {
      timeNow = new Date(2009, 4, 1, 11, 33, 12); // Set the time as you want (3 last args).
    }
  else
    {
      timeNow = new Date();
    }
  return timeNow;
}

var clockDisplay;
var digitBitmap;
var digitLetters;

function cacheObjects()
{
  clockDisplay = document.getElementById("clockDisplay");
  digitBitmap = new Array();
  digitBitmap[0] = new Array(7, 5, 5, 5, 7);
  digitBitmap[1] = new Array(2, 2, 2, 2, 2);
  digitBitmap[2] = new Array(7, 1, 7, 1, 7);
  digitBitmap[3] = new Array(7, 1, 7, 1, 7);
  digitBitmap[4] = new Array(5, 5, 7, 1, 1);
  digitBitmap[5] = new Array(7, 4, 7, 1, 7);
  digitBitmap[6] = new Array(1, 1, 7, 5, 7);
  digitBitmap[7] = new Array(7, 1, 1, 1, 1);
  digitBitmap[8] = new Array(7, 5, 7, 5, 7);
  digitBitmap[9] = new Array(7, 5, 7, 1, 1);
  
  //  digitBitmap[] = new Array();

  digitLetters = new Array();
  digitLetters[0] = 'oɹǝz';
  digitLetters[1] = 'ǝuo';
  digitLetters[2] = 'oʍʇ';  
  digitLetters[3] = 'ǝǝɹɥʇ';  
  digitLetters[4] = 'ɹnoɟ';  
  digitLetters[5] = 'ǝʌıɟ';  
  digitLetters[6] = 'xıs';  
  digitLetters[7] = 'uǝʌǝs';  
  digitLetters[8] = 'ʇɥƃıǝ';  
  digitLetters[9] = 'ǝuıu';  
}

// Main function, does it all. Called every second.
function blinkSomething()
{
  var timeNow = currentTime();
  var hours = timeNow.getHours();
  var minutes = timeNow.getMinutes();
  var seconds = timeNow.getSeconds();

  with (Math)
  {
    var firstHourDigit = floor(hours / 10);
    var secondHourDigit = hours % 10;
    var firstMinuteDigit = floor(minutes / 10);
    var secondMinuteDigit = minutes % 10;
    var firstSecondDigit = floor(seconds / 10);
    var secondSecondDigit = seconds % 10;
  }
  clockDisplay.innerHTML = 
    digitLetters[firstHourDigit] + ' ' + digitLetters[secondHourDigit]
    + '<br>' +
    digitLetters[firstMinuteDigit] + ' ' + digitLetters[secondMinuteDigit]
    + '<br>' +
    digitLetters[firstSecondDigit] + ' ' + digitLetters[secondSecondDigit];
}


//-->
</script>
  </head>

<body onload="cacheObjects(); setInterval('blinkSomething()', 1000)" >
  <div id="initString"></div>
  <div id="clockDisplay" style='font:14pt "Courier New" "Courier" "Monaco"'>
  </div>
      </body>
    </html>
